package cn.cvs.dao.comment;

import cn.cvs.pojo.Comment;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CommentMapper {
    void addComment(Comment comment);
    List<Comment> getCommentsByPetId(Integer petId);
    Comment getCommentById(Integer commentId);
    void deleteComment(Integer commentId);

    List<Comment> getCommentsByParentId(Integer petId);
    // 其他可能的操作方法，如更新评论等

    List<Comment> list(@Param("state") Integer state,@Param("pageBean")Integer pageBean,@Param("pageSize")Integer pageSize);

    int count(@Param("state") Integer state);

    int update(Comment comment);

    Comment getById(Integer commentId);
}